Skip to content

Azure VM Command Execution Using Third-Party Extensions – Sa... - #332

Open
carlospolop wants to merge 1 commit into
masterfrom
update_Azure_VM_Command_Execution_Using_Third-Party_Ext_038ea42518020c8a
Open

Azure VM Command Execution Using Third-Party Extensions – Sa...#332
carlospolop wants to merge 1 commit into
masterfrom
update_Azure_VM_Command_Execution_Using_Third-Party_Ext_038ea42518020c8a

Conversation

@carlospolop

Copy link
Copy Markdown
Collaborator

🤖 Automated Content Update

This PR was automatically generated by the HackTricks News Bot based on a technical blog post.

📝 Source Information

🎯 Content Summary

Attack overview

The post demonstrates how Azure VM extension-management permissions can be converted into arbitrary operating-system command execution by abusing the legitimate third-party Salt Minion extension. This is not associated with a CVE. An attacker controlling an Azure principal with Microsoft.Compute/virtualMachines/extensions/write can install the extension on a Linux or Windows VM, configure it to connect to an attacker-controlled Salt Master, accept the VM's...

🔧 Technical Details

Converting Azure extension-write access into guest command execution: If an Azure principal can perform Microsoft.Compute/virtualMachines/extensions/write, it may be able to cross from control-plane access into the operating-system guest by installing a legitimate management extension configured with attacker-controlled infrastructure. For Salt, deploy turtletraction.oss/salt-minion.linux or salt-minion.windows and set master_address to a rogue Salt Master. The VM agent installs the extension, after which the minion initiates outbound ZeroMQ connections over TCP 4505/4506. This avoids SSH, RDP, guest credentials, and inbound connectivity while making the activity resemble legitimate VM administration.

Taking control of a Salt Minion through a rogue master: A newly connected minion submits its public key and remains untrusted until the master accepts it with salt-key -a <...

🤖 Agent Actions

Done — I updated:

  • src/pentesting-cloud/azure-security/az-privilege-escalation/az-virtual-machines-and-network-privesc.md

Added a new subsection under Microsoft.Compute/virtualMachines/extensions/write covering:

  • abuse of the legitimate third-party Salt Minion extension
  • rogue Salt Master setup path conceptually
  • Linux/Windows az vm extension set examples
  • salt-key / salt ... cmd.run usage
  • guest-side IMDS token theft via Salt-delivered commands

Also added a ## References section at the end with:

  • NetSPI blog
  • Microsoft Salt Minion extension docs
  • Azure IMDS docs

I kept the change in a single file to avoid duplication.


This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.

@carlospolop

Copy link
Copy Markdown
Collaborator Author

🔗 Additional Context

Original Blog Post: https://netspi.com/blog/technical-blog/cloud-pentesting/azure-vm-command-execution-using-third-party-extensions-part-2

Content Categories: Based on the analysis, this content was categorized under "Pentesting Cloud > Azure Pentesting > Az - Privilege Escalation > Az - Virtual Machines & Network Privesc; cross-reference from Az - Post Exploitation > Az - VMs & Network Post Exploitation under a new subsection such as "VM Extension Write to Guest RCE via Rogue Salt Master"".

Repository Maintenance:

  • MD Files Formatting: 590 files processed

Review Notes:

  • This content was automatically processed and may require human review for accuracy
  • Check that the placement within the repository structure is appropriate
  • Verify that all technical details are correct and up-to-date
  • All .md files have been checked for proper formatting (headers, includes, etc.)

Bot Version: HackTricks News Bot v1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant